package com.example.basicdemo.config;

import com.example.basicdemo.service.PermissionService;
import com.example.basicdemo.service.impl.PermissionServiceImpl;
import com.isyscore.os.dev.api.http.DefaultIsyscoreClient;
import com.isyscore.os.dev.config.IsyscoreConfigProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties({IsyscoreConfigProperties.class})
public class PermissionAutoConfiguration {
    public PermissionAutoConfiguration() {
    }

    @Bean({"permissionService"})
    public PermissionService permissionService(IsyscoreConfigProperties isyscoreConfigProperties) {
        return new PermissionServiceImpl(new DefaultIsyscoreClient(isyscoreConfigProperties));
    }
}
